package com.naughty.shopapi.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Accessors(chain = true)
@TableName(value = "Categories", autoResultMap = true)
public class Categories implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private Integer pid;
    private Integer status;
    private Integer level;
    @JsonIgnore
    @TableField("`group`")
    private String group;
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private Date created_at;
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updated_at;

//    @TableField(exist = false) //声明数据库中不存在
//    private T children;
}
